/*    */ package com.qmsk.business.activity.activity.controller;
/*    */ 
/*    */ import com.qmsk.business.activity.activity.dao.ActivityDAO;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import java.util.Date;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"/activity"})
/*    */ public class ActivityController
/*    */ {
/* 27 */   private static final Logger logger = Logger.getLogger(ActivityController.class);
/*    */ 
/*    */   @Autowired
/*    */   private ActivityDAO activityDao;
/*    */ 
/*    */   @RequestMapping(value={"find/activity/actId/{actId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListOptShopId(HttpServletRequest request, HttpServletResponse response, @PathVariable("actId") Long actId)
/*    */   {
/*    */     try {
/* 36 */       GsonEbRst gsonEbRst = this.activityDao.getGsonOfId(actId);
/* 37 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (Exception e) {
/* 39 */       logger.error(e);
/* 40 */       ResponseUtils.setErrorMsgResponse(
/* 41 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ 
/*    */   @RequestMapping(value={"find/activityList/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getactivityList(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*    */   {
/*    */     try
/*    */     {
/* 53 */       nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/* 54 */       Map params = new HashMap();
/* 55 */       params.put("Status", Integer.valueOf(1));
/* 56 */       params.put("actTime", new Date());
/*    */ 
/* 58 */       GsonEbRst gsonEbRst = this.activityDao.getGsonOfAll(params, nPageIdx, nPageSize);
/* 59 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (Exception e) {
/* 61 */       logger.error(e);
/* 62 */       ResponseUtils.setErrorMsgResponse(
/* 63 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.activity.activity.controller.ActivityController
 * JD-Core Version:    0.5.3
 */